<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html; charset=UTF-8" %>

<script>
	jQuery(function ($) {
		$("#saveForm").ajaxForm(function (data) {
			$("#mainDiv").html(data);
		});
	})
</script>

<div class="page-header">
	<h3>添加字典值</h3>
</div>
<div style="width: 60%;">
	<form id="saveForm" action="/value/save" method="post" class="form-horizontal" role="form">
		<div class="form-group">
			<label for="create-dicTypeCode" class="col-sm-2 control-label">
				字典类型<span style="color:red;">*</span>
			</label>
			<div class="col-sm-10">
				<select name="typeCode" class="form-control" id="create-dicTypeCode">
					<option></option>
					<c:forEach items="${types}" var="type">
						<option value="${type.code}">${type.name}</option>
					</c:forEach>
				</select>
			</div>
		</div>

		<div class="form-group">
			<label for="create-dicValue" class="col-sm-2 control-label">
				字典值<span style="color:red;">*</span>
			</label>
			<div class="col-sm-10">
				<input name="value" type="text" class="form-control" id="create-dicValue">
			</div>
		</div>

		<div class="form-group">
			<label for="create-text" class="col-sm-2 control-label">文本&nbsp;</label>
			<div class="col-sm-10">
				<input name="text" type="text" class="form-control" id="create-text">
			</div>
		</div>

		<div class="form-group">
			<label for="create-orderNo" class="col-sm-2 control-label">排序号&nbsp;</label>
			<div class="col-sm-10">
				<input name="orderNo" type="text" class="form-control" id="create-orderNo">
			</div>
		</div>
		<div style="text-align: center">
			<button type="submit" class="btn btn-primary" style="margin-right: 20px">保存</button>
			<button type="button" class="btn btn-default" onclick="back()">取消</button>
		</div>
	</form>
</div>